<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Fade In From Bottom Animation</title>
    <style>
      .div1 {
        width: 200px;
        height: 200px;
        background-color: #f0f0f0; /* 设置 div1 的背景色 */
        position: relative;
        overflow: hidden;
      }

      .content {
        opacity: 0; /* 初始时设置透明度为 0 */
        animation: fadeIn 1s forwards; /* 使用 fadeIn 动画，持续 1 秒，并保持最终状态 */
      }

      @keyframes fadeIn {
        from {
          transform: translateY(100%);
        }
        to {
          transform: translateY(0);
        }
      }

      /* 为了演示，添加一些子元素 */
      .content > div {
        width: 50px;
        height: 50px;
        background-color: #3498db;
        margin: 10px;
      }
    </style>
  </head>
  <body>
    <div class="div1">
      <div class="content">
        <div></div>
        <div></div>
        <!-- 其他内容 -->
      </div>
    </div>
  </body>
</html>
